<template>
  <el-config-provider :locale="locale">
    <RouterView />
  </el-config-provider>
</template>

<script lang="ts" setup>
  import { computed, onMounted } from 'vue'
  import { useI18n } from 'vue-i18n'
  const i18n = useI18n()
  const locale = computed(() => i18n.getLocaleMessage(i18n.locale.value))

  /**----------------------------lifecycle----------------------------------------------------------------------- */

  onMounted(() => {
    document.body.style.setProperty('--el-color-primary', '#3E72EB')
    document.body.style.setProperty('--el-menu-active-color', '#3E72EB')
  })
</script>
